package com.carpedil.shirodemo.system.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.stereotype.Component;

import java.time.LocalDateTime;

/**
 * 操作日志表
 *
 * @author carpedil
 * @since 2021-01-05
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Component
public class SysLog extends Model {

  private static final long serialVersionUID = 1L;

  @TableId(value = "id", type = IdType.AUTO)
  private Integer id;

  /** 用户名 */
  private String username;

  /** 操作 */
  private String operation;

  /** 响应时间/耗时 */
  private Integer time;

  /** 请求方法 */
  private String method;

  /** 请求参数 */
  private String params;

  /** IP */
  private String ip;

  /** 创建时间 */
  private LocalDateTime createTime;
}
